package org.dtrd.modules.shop.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.shop.entity.po.DtrdEntShcRdProductPush;

import java.util.Date;

/**
 * <p>
 * 商品推送表
 * </p>
 *
 * @author sun
 * @since 2022-09-03
 */
@Getter
@Setter
@ApiModel(value = "商品推送表详情")
public class ProductPushDetail {

    private Integer dataId;

    @ApiModelProperty("医生id")
    private Integer doctorId;

    @ApiModelProperty("患者id")
    private Integer patientId;

    @ApiModelProperty("推送商品")
    private String products;

    @ApiModelProperty("结算金额")
    private String usePrice;

    @ApiModelProperty("下单二维码")
    private String qrcodeUrl;

    @ApiModelProperty("下单二维码")
    private Date createTime;


    public ProductPushDetail parseFromPo(DtrdEntShcRdProductPush po) {
        dataId = po.getDataId();
        doctorId = po.getDoctorId();
        patientId = po.getPatientId();
        products = po.getProducts();
        usePrice = po.getUsePrice();
        qrcodeUrl = po.getQrcodeUrl();
        createTime = po.getCreateTime();
        return this;
    }
}
